package com.caifeng.domain;

import com.caifeng.domain.vo.DefaultVO;
import lombok.Data;

@Data
public class ResponseResult {
    private final Integer code;
    private final String msg;
    private final Object data;

    public ResponseResult(ResponseCode responseCode, Object data) {
        this.code = responseCode.getCode();
        this.msg = responseCode.getMsg();
        this.data = data;
    }

    public ResponseResult(ResponseCode responseCode) {
        this.code = responseCode.getCode();
        this.msg = responseCode.getMsg();
        this.data = DefaultVO.fail();
    }
}
